public class Main {
    public static void main(String[] args) {
        Animal dog=new Dog("旺财",3);
        if(dog instanceof Dog){
            Dog dog1=(Dog) dog;
            dog1.bark();
        }
    }
}